import {initType} from './couponActionType'
import {getCoupon} from '../../request/coupon'
export const couponAction = (data)=>({type:initType,data})

export const asyncInitAction = (uid) =>{

    return dispatch=>{getCoupon(uid).then(res=>{
        if(res.code === 200)
        {
            console.log(res);
            dispatch(couponAction(res.list))
        }
    })}

}